package com.ruoyi.adapayRefund.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.adapayRefund.mapper.AdapayRefundMapper;
import com.ruoyi.adapayRefund.domain.AdapayRefund;
import com.ruoyi.adapayRefund.service.IAdapayRefundService;

/**
 * 退款请求记录Service业务层处理
 *
 * @author ch
 * @date 2022-02-25
 */
@Service
public class AdapayRefundServiceImpl implements IAdapayRefundService
{
    @Autowired
    private AdapayRefundMapper adapayRefundMapper;

    /**
     * 查询退款请求记录
     *
     * @param id 退款请求记录主键
     * @return 退款请求记录
     */
    @Override
    public AdapayRefund selectAdapayRefundById(Long id)
    {
        return adapayRefundMapper.selectAdapayRefundById(id);
    }

    /**
     * 查询退款请求记录列表
     *
     * @param adapayRefund 退款请求记录
     * @return 退款请求记录
     */
    @Override
    public List<AdapayRefund> selectAdapayRefundList(AdapayRefund adapayRefund)
    {
        return adapayRefundMapper.selectAdapayRefundList(adapayRefund);
    }

    /**
     * 新增退款请求记录
     *
     * @param adapayRefund 退款请求记录
     * @return 结果
     */
    @Override
    public int insertAdapayRefund(AdapayRefund adapayRefund)
    {
        adapayRefund.setCreateTime(DateUtils.getNowDate());
        return adapayRefundMapper.insertAdapayRefund(adapayRefund);
    }

    /**
     * 修改退款请求记录
     *
     * @param adapayRefund 退款请求记录
     * @return 结果
     */
    @Override
    public int updateAdapayRefund(AdapayRefund adapayRefund)
    {
        adapayRefund.setUpdateTime(DateUtils.getNowDate());
        return adapayRefundMapper.updateAdapayRefund(adapayRefund);
    }

    /**
     * 批量删除退款请求记录
     *
     * @param ids 需要删除的退款请求记录主键
     * @return 结果
     */
    @Override
    public int deleteAdapayRefundByIds(Long[] ids)
    {
        return adapayRefundMapper.deleteAdapayRefundByIds(ids);
    }


    /**
     * 批量逻辑删除退款请求记录
     *
     * @param ids 需要删除的退款请求记录主键
     * @return 结果
     */
    @Override
    public int logicDeleteAdapayRefund(Long[] ids,String delType,Long delUser)
    {
        return adapayRefundMapper.logicDeleteAdapayRefund(ids,delType,delUser);
    }

    /**
     * 删除退款请求记录信息
     *
     * @param id 退款请求记录主键
     * @return 结果
     */
    @Override
    public int deleteAdapayRefundById(Long id)
    {
        return adapayRefundMapper.deleteAdapayRefundById(id);
    }
}
